package com.yhsimon.factory.simplefactory.pizzastore.pizza;

public abstract class Pizza {
    protected String name;

    //不同披萨的原材料不同
    public abstract void prepare();

    public void bake(){
        System.out.println(name+" baking;");
    }

    public void cut(){
        System.out.println(name+" cutting;");
    }

    public void box(){
        System.out.println(name+ " boxing;");
    }

    public void setName(String name) {
        this.name = name;
    }

    public  void process(){
        System.out.println("披萨制作过程......");
        prepare();
        bake();
        cut();
        box();
        System.out.println();
    }
}
